	$(document).ready(function(){
		$.get("http://localhost:8080/SSMFrame/logincheck.do",function(data,state){
			if(data=="true")
				window.location.href="http://localhost:8080/SSMFrame/jsp/home.jsp";
		});
	$("#login").click(function(){
		$.get("http://localhost:8080/SSMFrame/login.do?name="+$('#name1').val()+"&password="+$('#password1').val(),function(data,state){
			if(state=="success"&&data=="true")
				window.location.href="jsp/home.jsp";
			else if(data=="false")
				alert("登录失败,请检查用户名和密码")
		})
	})	
	}
	)

	